package bavaria.hightech.accounting;

import java.util.Calendar;
import java.util.Comparator;

import bavaria.hightech.banking.Money;

public class DateComparator implements Comparator {

	@Override
	public int compare(Object o1, Object o2) {
		Calendar c1 = ((Accounting)o1).getDate();
		Calendar c2 = ((Accounting)o2).getDate();
		
		if(c1.before(c2)) return -1;
		else if(c1.after(c2)) return 1;
		else return 0;
	}

}
